package cn.edu.njpi.trip;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/**
 * @author 朱宗辉
 * @version V1.0
 * @Package cn.edu.njpi.trip
 * @date 2021/12/12 上午1:45
 */
public class TripReducer extends Reducer<Text, Text, Text, Text> {
    private Text outV = new Text();

    @Override
    protected void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {
        outV = values.iterator().next();
        context.write(key, outV);
    }
}
